<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        {{msg}}
    </div>
</body>
<script src="./MVVM-1/mvvm.js"></script>
<script src="./MVVM-1/observer.js"></script>
<script src="./MVVM-1/watcher.js"></script>
<script src="./MVVM-1/compile.js"></script>
<script>

    /*数据劫持：
        將data中的每一个属性(包括深层属性)都拿了出来进行了重新定义
        让他们具备了对应的set&get方法*/

    var vm  = new MVVM({
        el:"#app",
        data:{
            damu:{
                damuname:"达姆",
                damuage:18,
                wife:{
                    wifename:"冬雨",
                    wifeage:17,
                    son:{
                        sonname:"老付",
                        sonage:7
                    }
                }
            },
            a:"a",
            b:"b"
        }
    })

    console.log(vm.a)

</script>
</html>